package cn.aitrox.ry.service.image.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.persistence.Id;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "anno_image_info")
@CompoundIndexes({@CompoundIndex(def = "{'group':1, 'groupType':1, 'mode':1}", unique = true)})
public class ImageInfoMongoEntity {

    public static final String FIELD_GROUP = "group";
    public static final String FIELD_GROUP_TYPE = "groupType";
    public static final String FIELD_MODE = "mode";

    @Id
    private String id;

    private String group;

    private String groupType;

    private String mode;

    private String info;

    private Date createTime;

    private Date updateTime;

}
